
package org.niugang.security.users.mapper;

import org.apache.catalina.LifecycleState;
import org.apache.ibatis.annotations.Mapper;

import org.niugang.security.common.dao.BaseDao;
import org.niugang.security.users.dto.UserDTO;
import org.niugang.security.users.pojo.RoleDO;
import org.niugang.security.users.pojo.UserDO;
import org.springframework.stereotype.Component;

import java.util.List;


/**
 * @author Created by niugang on 2018/12/26/13:40
 */
@Mapper
@Component(value = "userMapper")
public interface UserMapper extends BaseDao<UserDO, UserDTO> {

    /**
     * 根据用户账号返回用户信息
     *
     * @param s 账号
     * @return UserDO
     */
    UserDO loadUserByUsername(String s);

    List<RoleDO> getRoles(int userId);
}
